package com.zzl.bonds.ticket.dto.myticket;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.bonds.ticket.dto.KeyValue;
import com.zzl.general.common.utils.DoubleSerialize;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 我的票据中 融资中列表
 *
 * @author : spp
 * @date : 2022/2/24 19:06
 */
@ApidocModel
@Data
public class MyTicketFinancePage {
    @ApidocModelProperty(description = "主键")
    private String id;

    @ApidocModelProperty(description = "票据编号")
    private String ticketNo;

    @JsonSerialize(using = DoubleSerialize.class)
    @ApidocModelProperty(description = "融资本金")
    private Double sellAmount;

    /**
     * 利息 + 服务费
     */
    private Double financingCost;

    @ApidocModelProperty(description = "服务费")
    @JsonSerialize(using = DoubleSerialize.class)
    private Double serviceChage;

    /**
     * 成本 - 服务费
     */
    @JsonSerialize(using = DoubleSerialize.class)
    @ApidocModelProperty(description = "融资利息")
    private Double estimatedFinancingInterest;


    @ApidocModelProperty(description = "金融机构id")
    private Integer instinctyId;
    @ApidocModelProperty(description = "金融机构名称")
    private String instinctyName;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "兑付日期/到期日期", validate = "yyyy-MM-dd")
    private Date cashTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "创建时间/申请日期", validate = "yyyy-MM-dd")
    private Date createTime;

    @ApidocModelProperty(description = "融资上链地址")
    private String financeBillAddress;

    private Integer ticketStatus;

    @ApidocModelProperty(description = "操作按钮集合")
    private List<KeyValue> operateButton;

    @ApidocModelProperty(description = "融资申请表Id")
    private String parentBusinessId;

}
